#pragma once
#include "SingletonWindow.h"

class LoginWindow : public SingletonWindow<LoginWindow>
{
	typedef SingletonWindow<LoginWindow> base;
public:
	LoginWindow();
	~LoginWindow();

	void OnLoginFinished(bool sucess);
	
protected:
	virtual bool OnOpen();
	virtual void OnDestory();

private:
	CDXUTEditBox* mUserNameEditBox;
	CDXUTEditBox* mPasswordEditBox;
	CDXUTButton* mLoginButton;
	const int mExitGameButton;
	bool mLogging;

	void UpdateUIState();

	bool OnUserNameChanged(CDXUTControl*);
	bool OnLoginClicked(CDXUTControl*);
	bool OnExitGameClicked(CDXUTControl*);
};
